<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="yk.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<jsp:useBean id="userBean" class="com.walter.domain.Employee" scope="request">
	<jsp:setProperty name="userBean" property="*"></jsp:setProperty>
</jsp:useBean>
<jsp:useBean id="regist" class="yk.UserRegister" scope="request"></jsp:useBean>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户信息注册页面</title>
	</head>
	<body>
		<%
			String name = request.getParameter("name");
		    String sex = request.getParameter("sex");
		    String card = request.getParameter("card");
		    String tele = request.getParameter("tele");
		    String email = request.getParameter("email");
		    String num = request.getParameter("num");
			String password = request.getParameter("password");
			
			
			userBean.setName(name);
			userBean.setSex(sex);
			userBean.setCard(card);
			userBean.setTele(tele);
			userBean.setEmail(email);
			userBean.setNum(num);
			userBean.setPassword(password);
			System.out.println(name + sex + card + tele + email + num + password);
		%>
		<%
			try {
				regist.setUserBean(userBean);
				out.println(name);
				regist.regist();
				out.print("注册成功！");
			} catch (Exception e) {
				out.println(e.getMessage());
			}
		%>
		<br>
		<a href="${pageContext.request.contextPath}/admin/index.jsp">返回登录</a>
	</body>
</html>